home *** CD-ROM | disk | FTP | other *** search
- /*
- CFlash -- a sample HyperCard user-defined command in C.
- ©Apple Computer, Inc. 1987
- All Rights Reserved.
- */
-
- #include <Types.h>
- #include <MemoryMgr.h>
- #include <OSUtil.h>
- #include <QuickDraw.h>
- #include "XCmd.h"
-
- /* **** WARNING: DO NOT USE GLOBAL VARIABLES! **** */
-
- pascal void main(paramPtr)
- XCmdBlockPtr paramPtr;
- {
- short flashCount,again;
- GrafPtr port;
- Str31 str;
-
- /* First param is flash count. Convert it to a pascal string */
- ZeroToPas(paramPtr,(char *)*(paramPtr->params[0]),(StringPtr)&str);
- /* Convert the string to a number */
- flashCount = StrToNum(paramPtr,&str);
- GetPort(&port);
- for (again = 1; again <= flashCount; again++)
- {
- InvertRect(&port->portRect);
- InvertRect(&port->portRect);
- }
- }
-
-
-